home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Puzzle / badapple.swf / scripts / DefineButton2_24 / BUTTONCONDACTION on(release).as
Encoding:
Text File  |  2007-03-28  |  886 b   |  36 lines

  1. on(release){
  2.    if(eval("/thescript:stopclick") == false)
  3.    {
  4.       set("/:currentx",myx);
  5.       set("/:currenty",myy);
  6.       tempcount = 0;
  7.       clearChecked();
  8.       tempCount = getNumberSurrounding(myx,myy);
  9.       _root.theScript.tempcount[myPlace] = tempcount;
  10.       set("/:currentx",0);
  11.       set("/:currenty",0);
  12.       if(isbad == 1)
  13.       {
  14.          set("/thescript:stopclick",true);
  15.          gotoAndPlay(85);
  16.          _root.badApple.gotoAndPlay("start");
  17.       }
  18.       else
  19.       {
  20.          if(tempCount == 0)
  21.          {
  22.             clearSurounding(myx,myy);
  23.          }
  24.          else
  25.          {
  26.             set("/thescript:numleft",eval("/thescript:numleft") - 1);
  27.             if(eval("/thescript:numleft") == 0)
  28.             {
  29.                set("/thescript:stopclick",true);
  30.             }
  31.          }
  32.          gotoAndPlay(3);
  33.       }
  34.    }
  35. }
  36.